package com.qiall.boot.userservice.data.mapper;

import com.qiall.boot.userservice.data.entity.UserQueryBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import com.qiall.boot.userservice.data.entity.UserInfo;

import java.util.List;

@Mapper
public interface UserMapper {
    void insert(UserInfo userInfo);

    void update(UserInfo userInfo);

    UserInfo select(@Param("id") int id);

    UserInfo selectByAccount(@Param("account") String account);

    List<UserInfo> selectByAccountAndOrgId(@Param("account") String account,@Param("orgId")Integer orgId);


    List<UserInfo> selectAll();

    List<UserInfo> selectByPage(@Param("userInfo") UserQueryBean userInfo, @Param("limit") int limit, @Param("offset") int offset);

    int count(@Param("userInfo") UserQueryBean userInfo);

    void delete(@Param("id")Integer id);

    int countByRoleId(@Param("roleId")Integer roleId);


}
